﻿using Shop.Tools;
using SqlSugar;

namespace Shop.Server
{
    internal class SqlSugarBase
    {
        public static SqlSugarClient db
        {
            get => new SqlSugarClient(new ConnectionConfig()
                {
                    ConnectionString = StaticConst.SqlConfig,
                    DbType = DbType.SqlServer,
                    IsAutoCloseConnection = true,
                    InitKeyType = InitKeyType.SystemTable,
                    IsShardSameThread = true
                }
            );
        }
    }
}